package osSRC.fit;
class Area {
	public int getAddress() {
		return address;
	}
	public int getLength() {
		return length;
	}
	private int address;
	private int length;
	public Area last;
	public Area next;
	Area(){}
	Area(int address, int length){
		this.address=address;
		this.length=length;
	}
	int allocate(int size){
		if(size>this.length)return -1;
		else if(size==this.length)return 0;
		this.length-=size;
		return 1;
	}
	@Override
	public String toString() {
		return "address: "+this.address
				+"\tlength: "+this.length;
	}
}